package com.speedy.course.ext

import com.google.gson.Gson

val gson by lazy { Gson() }

fun Any.toJson(): String {
    return gson.toJson(this)
}

inline fun <reified T> String.fromJson(): T {
    return gson.fromJson(this, T::class.java)
}

